package com.laopan.wxpay.request.prepay;

import com.laopan.wxpay.WxConstants;
import com.laopan.wxpay.bean.prepay.H5PrepayResult;
import com.laopan.wxpay.bean.prepay.PrepayOrder;
import com.laopan.wxpay.config.WxPayConfig;
import com.laopan.wxpay.exception.WxPayException;
import com.laopan.wxpay.request.WxPayRequest;

/**
 * <p>
 *
 * </p>
 *
 * @author laopan
 * @className H5Prepay
 * @date 2021/4/22 10:36
 */

public class H5Prepay extends WxPayRequest<PrepayOrder, H5PrepayResult> implements
        Prepay<PrepayOrder, H5PrepayResult> {
    public H5Prepay(WxPayConfig wxPayConfig) {
        super(wxPayConfig);
    }

    @Override
    protected Class<H5PrepayResult> getResultClass() {
        return H5PrepayResult.class;
    }

    @Override
    public H5PrepayResult prepay(PrepayOrder prepayOrder) throws WxPayException {
        return post(WxConstants.H5_PAY_PATH, prepayOrder);
    }
}
